package cn.edu.wynu.complex;

import org.springframework.context.support.ClassPathXmlApplicationContext;


public class TestComplexInject {
    String name;
    Integer age;

    public void setName(String name) {
        this.name = name;
    }

    public void setAge(Integer age) {
        this.age = age;
    }


    public static void main(String[] args) {
        ClassPathXmlApplicationContext context =
                new ClassPathXmlApplicationContext("complexBeans.xml");
        Object lgc = context.getBean("lgc");
        Object lgc2 = context.getBean("lgc");

        Object qs = context.getBean("qs");
        Object qs2 = context.getBean("qs");

        System.out.println(lgc);
        System.out.println(lgc2);

        System.out.println(qs2);
        System.out.println(qs);

        System.out.println("******************************");

        Object zs = context.getBean("zs");
        Object ls = context.getBean("ls");
        System.out.println(zs);
    }
}
